package com.command;

import java.util.ArrayList;

public class waitor {
	private ArrayList<command> commands=null;
	public waitor(){
		commands=new ArrayList<command>();
	}
	
	public void setcommand(command cmd){
		commands.add(cmd);
	}
	public void orderup(){
		System.out.println("有订单");
		for(command cmd:commands){
			if(cmd!=null){
				cmd.execute();
			}
		}
	}
	

}
